<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>vue-dev-platform</title>
    <script src="http://localhost:9898/socket.io/socket.io.js"></script>
    <script>
      try {
        window.socket = io("http://localhost:9898");
        window.socketCallback = {
          applySettingSuccess: null,
          applySettingFail: null,
          applySettingData: null,

          getLatestCodesSuccess: null,
          getLatestCodesFail: null,
          getLatestCodesData: null,

          installDependenceSuccess: null,
          installDependenceFail: null,
          installDependenceData: null,

          gitCommitAllSuccess: null,
          gitCommitAllData: null,
        };
        Object.keys(socketCallback).forEach(item => {
          socket.on(item, function(){
            socketCallback[item] && socketCallback[item].apply(socket, arguments)
          })
        })
      } catch (e) {console.log(e);}
      try {window.require = require;} catch (e) {console.log(e);}
    </script>
  </head>
  <body><div id="app"></div></body>
</html>
